package owl2vowl.model;

import owl2vowl.model.HasAnnotations;
import owl2vowl.model.HasIri;
import owl2vowl.model.VowlVisitable;
import owl2vowl.model.annotation.Annotations;
import owl2vowl.parser.helper.ComparisonHelper;
import org.semanticweb.owlapi.model.IRI;

public abstract class AbstractVowlObject implements HasIri, HasAnnotations, VowlVisitable {
	protected IRI iri;
	protected IRI baseIri;
	private Annotations annotations = new Annotations();

	public AbstractVowlObject(IRI iri) {
		this.iri = iri;
		if (iri != null) {
			this.baseIri = IRI.create(ComparisonHelper.extractBaseIRI(iri.toString()));
		}

	}

	public IRI getBaseIri() {
		return this.baseIri;
	}

	public Annotations getAnnotations() {
		return this.annotations;
	}

	public IRI getIri() {
		return this.iri;
	}
}